{% extends "smra_portal/portal_template.html" %}
{% block page_id %}object{% endblock %} 

{% load markup %}

{% block main %}

<div class="page_title">{{description|force_escape|textile}}</div>

{% for schema,params in metadata%} 
    <div class="schema_set">
    	<h1>{{ schema }}</h1>
    	
    	<!-- Do links only -->
    	<div class="button_row">
      	{% for name, type, value in params %}  
   			{% if type == 'LINK' %}
    			<a href="{{value}}">{{name}}</a>
    		{% endif %}
     	{% endfor %}
     	</div>
     	
      	<!-- Do data fields only -->  	
    	<table class="row_set">	    	
    	{% for name, type, value in params %}    
    	    {% if type == 'LINK' %}
     			<!-- ignore -->
     		{% else %}   	    
   				<tr class="{% cycle 'row_odd' 'row_even' %}">  		
       				<td class="row_label">{{name}}&nbsp;:</td>
       				{% if type == 'DATE' %}
       				
    				<td class="row_field">{{ value}}</td>
    				{% else %}
        			<td class="row_field">{{ value|force_escape|textile}}</td>
        			{% endif %}
        		</tr>
    		{% endif %}
     	{% endfor %}
    	</table>
    </div>     
{% endfor %}

{% endblock %}
